import request from '@/utils/request'
/*
 * 获取任务录入全部品牌
 */

export function getbrandMaterialNew() {
  return request({
    url: '/brand/getbrandMaterialNew',
    method: 'get',
    headers: {
      'Content-Type': 'application/json;charset=UTF-8'
    },
  })
}

/*
 * 获取任务录入成本中心
 */

export function getCostCenter(id) {
  return request({
    url: `/brand/getCostCenter?brandId=${id}`,
    method: 'get',
    headers: {
      'Content-Type': 'application/json;charset=UTF-8'
    },
  })
}

/*
 * 任务录入, 提交录入
 */

export function addTask(data) {
  return request({
    url: `/task/addTask`,
    method: 'post',
    headers: {
      'Content-Type': 'application/json;charset=UTF-8'
    },
    data: {
      type: 2,
      data
    }
  })
}

/*
 * 优秀作品, 获取全部组员
 */

export function getGroups() {
  return request({
    url: `/user/getGroups`,
    method: 'get',
    headers: {
      'Content-Type': 'application/json;charset=UTF-8'
    },
  })
}

/*
 * 优秀作品, 获取组员优秀作品
 */

export function getGoodWorks(data) {
  return request({
    url: '/task/getGoodWorks',
    method: 'post',
    headers: {
      'Content-Type': 'application/json;charset=UTF-8'
    },
    data: {
      data,
      type: 2
    }
  })
}


/*
 * 优秀作品, 下载组员优秀作品
 */

export function downLoadGoodWords(data) {
  return request({
    url: '/task/downLoadGoodWords',
    method: 'post',
    headers: {
      'Content-Type': 'application/json;charset=UTF-8'
    },
    data: {
      data,
      type: 2
    }
  })
}
